﻿<%@ Page AutoEventWireup="true" CodeFile="SplitTask.aspx.cs" Inherits="Task_SplitTask"
    Language="C#" MasterPageFile="Task.master" StylesheetTheme="Content" Title="Untitled Page" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="ContentPlaceHolder1">

    <script type="text/javascript">
        function CheckDate(Obj) {
            var d = new Date(document.getElementById(Obj).value.replace("-", ","));
            var c = new Date();
            if (d < c) {
                document.getElementById(Obj).value = c.getFullYear() + "-" + Math.floor(c.getMonth() + 1) + "-" + c.getDate();
                alert("所选日期不能小于当前日期！");
            }
        }
        function EvalDate(Obj1, Obj2) {
            var d1 = new Date(document.getElementById(Obj1).value.replace("-", ","));
            var d2 = new Date(document.getElementById(Obj2).value.replace("-", ","));
            if (d1 > d2) {
                alert("截止日期必须大于开始日期！");
            }
        }
    </script>

    <ajaxToolkit:CalendarExtender ID="CalendarExtender_StartDate" runat="server" Animated="False"
        Format="yyyy-MM-dd" TargetControlID="StartDate">
    </ajaxToolkit:CalendarExtender>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_EndDate" runat="server" Format="yyyy-MM-dd"
        TargetControlID="EndDate" Animated="False">
    </ajaxToolkit:CalendarExtender>
    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="100%">
        <caption>
            <span>分解任务</span></caption>
        <tr>
            <td>
                <div class="line">
                    <span class="label">上级任务：</span>
                    <asp:DropDownList ID="TaskList" runat="server" Width="608px">
                    </asp:DropDownList>
                    &nbsp;
                </div>
                <div class="line">
                    <span class="label">任务名称：</span><asp:TextBox ID="TaskTitle" runat="server" SkinID="textbox_cn"
                        Width="600px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ReqTaskTitle" runat="server" ControlToValidate="TaskTitle">必需</asp:RequiredFieldValidator></div>
                <div class="line">
                    <span class="label">起止时间：</span><asp:TextBox ID="StartDate" runat="server" SkinID="textbox_en"
                        Width="120px"></asp:TextBox>
                    至
                    <asp:TextBox ID="EndDate" runat="server" SkinID="textbox_en" Width="120px"></asp:TextBox></div>
                <div class="line">
                    <span class="label">迟报扣分：</span><asp:TextBox ID="txtLadePines" runat="server" SkinID="textbox_en"
                        Width="77px" Text="0"></asp:TextBox>
                    分<span class="comment">&nbsp;&nbsp;&nbsp;&nbsp; 上报时间迟于结束时间所扣分数</span>
                </div>
                <div class="line">
                    <span class="label">任务内容：<br />
                        (首行空4个<br />
                        半角空格)</span><asp:TextBox ID="TaskComment" runat="server" Height="240px" SkinID="textbox_cn"
                            TextMode="MultiLine"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ReqTaskComment" runat="server" ControlToValidate="TaskComment">必需</asp:RequiredFieldValidator></div>
                <div class="button">
                    <asp:Button ID="ButtonSave" runat="server" OnClick="ButtonSave_Click" Text="确定" />
                    <asp:Button ID="ButtonCancel" runat="server" CausesValidation="False" OnClick="ButtonCancel_Click"
                        Text="取消" />
                    <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" OnClick="ButtonDelete_Click"
                        Text="删除" /><br />
                    <br />
                    <asp:Label ID="Prompt" runat="server" ForeColor="Red"></asp:Label><br />
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
